package net.crowdloud.server.DatabaseAccess.problem;

import javax.jdo.PersistenceManager;


public class GetProblem {

	public static net.crowdloud.shared.entities.Problem get(
			PersistenceManager persistenceManager, Long problemID) {

		Problem problemDatabase = getProblemDatabase(persistenceManager,
				problemID);

		net.crowdloud.shared.entities.Problem problem = ConvertDatabaseToProblem
				.getProblem(problemDatabase);

		return problem;
	}

	public static Problem getProblemDatabase(
			PersistenceManager persistenceManager, Long problemID) {

		Problem problemDatabase = persistenceManager.getObjectById(
				Problem.class, problemID);

		return problemDatabase;
	}

}
